<template>
	<view>
		<!-- 轮播图 -->
		<view>
			<up-swiper :list="bannerList" indicator indicatorMode="line" circular></up-swiper>
		</view>
		<view>
			<view>

			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		getBanner,
		getProductListApp
	} from '@/api/home.js'
	import {
		counterStore
	} from '@/store/modules/counter.js'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		reactive
	} from 'vue';

	// 获取轮播图数据
	const bannerList = ref([]);
	// 轮播图下面的
	const sj = ref([])
	const getBannerData = async () => {
		try {
			const result = await getBanner()
			bannerList.value = result.list
			// console.log('数据', bannerList.value)
		} catch (error) {}
	}
	const getProductListAppData = async () => {
		let data = {
			productStatus: '0'
		}
		try {
			const appdata = await getProductListApp(data)
			sj.value = appdata.list
			// console.log('数据', sj.value)
		} catch (err) {}
	}
	onLoad(() => {
		getBannerData()
		getProductListAppData()
	})
</script>

<style>

</style>